home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / haziran / 20 / setup.exe / {app} / plugins / XQ Context Menu Options.xpl < prev    next >
Encoding:
XSetup plugin  |  2001-03-28  |  3.8 KB  |  143 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="2"
  4. "UIPATH"="Appearance\Files&Folders\ANY file"
  5. "NAME"="Any File Context Menu Options #1"
  6. "VERSION"="2.06"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Enable "QuickView..." for any file"
  9. "TEXT 2"="Enable "Open with..." for any file"
  10. "DESCRIPTION 1"="If you activate "Enable QuickView for any file", you can right-click any file and select "QuickView" from the appearing menu to have a look on it. Windows 2000 and Windows Millennium do not support this option, but you can install Quick View Plus instead."
  11. "DESCRIPTION 2"="WARNING: If this option is activated and you are using the Microsoft Office Shortcut Bar, the Shortcut Bar may not work correctly any longer. In this case, deactivate this option again and restart your PC."
  12. "DESCRIPTION 3"="Enable "Open with..." to easily change which program is used to open a file (by default, you need to hold down SHIFT and right-click a file to display this item). If it's activated, this option is automatically visible on the right-click menu."
  13. "AUTHOR"="Xteq Systems"
  14. "CONTACTURL"="http://www.xteq.com"
  15. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  16. "COMMENT 1"="George W. Bush sucks!"
  17.  
  18.  
  19. bQE=true
  20. bDH=true
  21. bDH2=true
  22. Sub Plugin_Initialize 
  23.  s=RegReadValue("HKCR\*\QuickView\@")
  24.  if s="*" then 
  25.   SetUIElement 1,true
  26.  else
  27.   bQE=false
  28.  end if
  29.  
  30.  s=RegReadValue("HKCR\*\Shell\openas\command\@")
  31.  if not IsEmpty(s) then
  32.   SetUIElement 2,true
  33.  else
  34.   SetUIElement 2,false
  35.  end if
  36.  
  37.  
  38.  s=RegReadValue("HKCR\Directory\Shell\DosHere\Command\@")
  39.  'Call DebugMsg(s)
  40.  if Len(s)>0 then
  41.     SetUIElement 3,true
  42.  else
  43.     bDH=false
  44.  end if 
  45.  
  46.  s=RegReadValue("HKCR\Drive\Shell\DosHere\Command\@")
  47.  'Call DebugMsg(s)
  48.  if Len(s)>0 then
  49.     SetUIElement 4,true
  50.  else
  51.     bDH2=false
  52.  end if 
  53. End Sub
  54.  
  55. Sub Plugin_CheckData(ElementIndex)
  56. End Sub
  57.  
  58. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  59.  bW9x=false
  60.  if GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then      'Windows 95/98/ME
  61.     bW9x=true
  62.  end if
  63.  
  64.  
  65.  b=GetUIElement(1)
  66.  if b=true then
  67.   Call RegWriteValue("HKCR\*\QuickView\@","*",1)
  68.  else
  69.   if bQE=true then
  70.    Call RegDeletePath("HKCR\*\QuickView")
  71.   end if
  72.  end if
  73.  
  74.  
  75.  b=getuielement(2)
  76.  if b=true then
  77.   call RegWriteValue("HKCR\*\Shell\openas\command\@","rundll32.exe shell32.dll,OpenAs_RunDLL ""%1""",1)
  78.   call RegWriteValue("HKCR\*\Shell\openas\@","Open with...",1)
  79.  else
  80.   'delete! lts of work!
  81.   if RegPathExists("HKCR\*\Shell\openas\command") then
  82.      Call RegDeletePath("HKCR\*\Shell\openas\command")
  83.   end if
  84.  
  85.   if RegPathExists("HKCR\*\Shell\openas") then
  86.      Call RegDeletePath("HKCR\*\Shell\openas")
  87.   end if
  88.  end if
  89.  
  90.  
  91.  
  92.  s=""
  93.  b=GetUIElement(3)
  94.  if b=true then
  95.   if bW9x=true then
  96.      s=GetWinDir
  97.      s=s & "command.com /k cd ""%1"""
  98.   else
  99.      'Windows NT/2000
  100.      s=GetWinSysDir
  101.      s=s & "cmd.exe /k cd ""%1"""
  102.   end if
  103.  
  104.   Call RegWriteValue("HKCR\Directory\Shell\DosHere\@","DOS &Prompt Here",1)
  105.   Call RegWriteValue("HKCR\Directory\Shell\DosHere\Command\@",s,1)
  106.  else 'Disable it!
  107.   if bDH=true then
  108.    Call RegDeletePath("HKCR\Directory\Shell\DosHere\Command")
  109.    Call RegDeletePath("HKCR\Directory\Shell\DosHere")
  110.   end if
  111.  end if
  112.  
  113.  
  114.  
  115.  s=""
  116.  b=GetUIElement(4)
  117.  if b=true then
  118.   if bW9x=true then
  119.      'Windows 95/98/ME
  120.      s=GetWinDir
  121.      s=s & "command.com /k cd ""%1"""
  122.   else
  123.      'Windows NT/2000
  124.      s=GetWinSysDir
  125.      s=s & "cmd.exe /k cd ""%1"""
  126.   end if
  127.  
  128.   Call RegWriteValue("HKCR\Drive\Shell\DosHere\@","DOS &Prompt Here",1)
  129.   Call RegWriteValue("HKCR\Drive\Shell\DosHere\Command\@",s,1)
  130.  else 'Disable it!
  131.   if bDH2=true then
  132.      Call RegDeletePath("HKCR\Drive\Shell\DosHere\Command")
  133.      Call RegDeletePath("HKCR\Drive\Shell\DosHere")
  134.   end if
  135.  end if
  136.  
  137.  
  138.  
  139. End Sub
  140.  
  141. Sub Plugin_Terminate 
  142. End Sub
  143.